package apiUDP;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import Factory.SocketFactory;
import Server.InterfaceServerSocket;
import Server.ServerSocketUDP;
import java.io.*;
import java.net.*;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * 
 * @author manelv8
 */
public class ServerUDPAPI {

	public static void main(String[] args) {
        try {
            int port = 8080;
            InterfaceServerSocket server =SocketFactory.getServer(SocketFactory.UDP, port);
            System.out.println("SERVIDOR UDP ONLINE");
            while(true){
               server.aceitar(); 
               
            }
        } catch (IOException ex) {
            Logger.getLogger(ServerUDPAPI.class.getName()).log(Level.SEVERE, null, ex);
        }
                     
			


	}

	
}
